#include "LinkQueue.h"
#include <iostream>
//约瑟夫环



int main()
{
    LinkQueue q;
    for(long i = 1; i <= 13; i++)
    {
        q.Push((void*)i);
    }

    int count = 0;
    while(q.Size() > 1)
    {
        long num = (long)*q.GetFront();
        q.Pop();
        count++;
        if(count == 3)
        {
            std::cout<<num<<"被杀死!\n";
            count = 0;
        }
        else
        {
            q.Push((void*)num);
        }
    }
    std::cout<<(long)*q.GetFront()<<"最后存活!\n";
    return 0;
}